package com.service.netty;

import com.rpc.handler.RpcServiceHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class NettyServer  {
    @Autowired
    private RpcServiceHandler rpcServiceHandler;

    @PostConstruct
    public void startServer() throws InterruptedException {
        rpcServiceHandler.startServer("127.0.0.1",5181,"admin2");
    }

}
